<?
$product = __template_get("product");
$size = __sysparam("thumbs","size");
?>
<div class="product-detail span-22">
	<p class="title">
	<?= Html::link("catalog","show","product",$product->product_id,Html::db($product->name)) ?>
	</p>
	<div class="details span-7">
		<?= Html::image(__imageSizer("webapp/public/media/".$product->image,"medium"),
						"webapp/public/media/".$product->image,
						Html::db($product->name),
						"cover") ?>
		<p class="price left"><?= Html::currency($product->price) ?></p>
		<p class="availability left">
				<?= ($product->availability_date<=__sysparam('system','today')?"available":"(<acronym title=\"Delayed until ".Html::dateFromDB($product->availability_date)."\">Delayed</acronym>)") ?>
		</p>
	</div>
	<div class="description span-10 tjustify">
		<p><?=Html::db($product->description)?></p>
		<div class="command">
			<?= HtmlHelpers::ajaxAddButton("cart","add","product",$product->product_id,
						__s('cart','addButton_title',$product->name),
						array('ajaxTarget'=>"cartlist",
							  'styleclass'=>"fright")) ?>
			<?= Html::link("home","list","category","1",__("home","back_home_label"),
				 array(	'description'=>__("home","back_home_description"),
				 		'styleclass'=>"smallbutton",
				 		'accesskey'=>__("home","back_home_accesskey"),
				 		'image'=>"webapp/public/images/icons/house.png")) ?>
			<div class="spacer"></div>
		</div>
		
		<?
		__template_set("resources",$product->resources);
		__template_set("title",$product->name);
		__template("entities/resource/gallery"); ?>
	</div>
</div>
